← 返回第4章导航

4.8 Tree diagrams

树状图 - 连续事件的概率计算与可视化表示

一、核心知识点

1. 树状图的基本原理

树状图用于展示连续事件的结果与概率,通过"分支相乘(乘法原理)"计算联合概率,"路径相加(加法原理)"计算互斥事件的概率。

基本结构

  • 起点:表示初始状态或第一个实验
  • 分支:表示不同结果的可能性,用概率标注
  • 节点:表示实验结果后的新状态
  • 终点:表示最终结果的概率

2. 放回与不放回的区别

放回情况:每次实验的概率不变,总数不变

不放回情况:每次实验后需更新总数和对应类别数量

关键区别:不放回时顺序会影响最终概率,需要考虑实验的先后顺序

3. 条件概率在树状图中的应用

结合树状图的分支概率,利用公式 \( P(B|A) = \frac{P(A \cap B)}{P(A)} \) 计算条件概率。

计算方法

  • 识别条件事件A的所有路径
  • 计算目标事件B在这些路径中的概率
  • 求出条件概率的比值

4. 树状图的绘制技巧

绘制步骤

  • 从左到右绘制,第一级分支表示第一个实验
  • 每个分支标注对应的概率
  • 第二级分支从第一级分支的终点开始
  • 确保所有分支概率之和为1

概率标注:每个分支上标注该分支的条件概率

二、例题

Example 15

A bag contains seven green beads and five blue beads. A bead is taken from the bag at random and not replaced. A second bead is then taken from the bag.

Find the probability that:

a) both beads are green

b) the beads are different colours.

解答

a) 两颗珠子都是绿色

第一步取绿珠概率 \( \frac{7}{12} \),不放回后剩6绿11珠,第二步取绿珠概率 \( \frac{6}{11} \)。

联合概率:\( \frac{7}{12} \times \frac{6}{11} = \frac{7}{22} \)。

b) 珠子颜色不同

不同颜色分"绿后蓝"和"蓝后绿"两种情况:

  • 绿后蓝:\( \frac{7}{12} \times \frac{5}{11} = \frac{35}{132} \)
  • 蓝后绿:\( \frac{5}{12} \times \frac{7}{11} = \frac{35}{132} \)

总概率:\( \frac{35}{132} + \frac{35}{132} = \frac{35}{66} \)。

Example 16

The turnout of spectators at a Formula 1 race is dependent upon the weather. On a rainy day, the probability of a big turnout is 0.4, but if it doesn't rain, the probability of a big turnout increases to 0.9. The weather forecast gives a probability of 0.75 that it will rain on the day of the race.

a) Draw a tree diagram to represent this information.

b) Find the probability that there is a big turnout and it rains.

c) Find the probability that there is a big turnout.

解答

a) 树状图结构

F1比赛观众人数树状图

第一分支:雨(R)概率0.75,不雨(R')概率0.25。

雨的后续分支:大 turnout(B)0.4,不大(B')0.6;

不雨的后续分支:大 turnout(B)0.9,不大(B')0.1。

b) 大 turnout且下雨的概率

联合概率:\( P(B \cap R) = P(B|R) \times P(R) = 0.4 \times 0.75 = 0.3 \)。

c) 大 turnout的概率

大 turnout概率为"雨且大"加"不雨且大":

\( P(B) = 0.3 + (0.25 \times 0.9) = 0.525 \)。

Example 17

A bag contains 6 green beads and 4 yellow beads. A bead is taken from the bag at random, the colour is recorded and it is not replaced. A second bead is then taken from the bag and its colour recorded. Given that both beads are the same colour, find the probability that they are both yellow.

解答

步骤1:计算同色的概率

同绿:\( \frac{6}{10} \times \frac{5}{9} = \frac{30}{90} \)

同黄:\( \frac{4}{10} \times \frac{3}{9} = \frac{12}{90} \)

同色总概率:\( \frac{30 + 12}{90} = \frac{7}{15} \)。

步骤2:计算条件概率

\( P(\text{同黄} | \text{同色}) = \frac{\frac{12}{90}}{\frac{42}{90}} = \frac{2}{7} \)。

三、树状图绘制与计算技巧

1. 树状图绘制技巧

基本规则

  • 从左到右绘制,清晰显示实验顺序
  • 每个分支标注对应的概率
  • 确保从每个节点出发的分支概率和为1
  • 用不同的颜色或样式区分不同类型的分支

标注规范

  • 每个分支上标注条件概率
  • 最终路径概率是所有分支概率的乘积
  • 边缘概率是到达同一终点的所有路径概率之和

2. 不放回实验的概率计算

计数更新

  • 每次实验后更新剩余总数
  • 更新特定类别剩余数量
  • 注意顺序敏感性(先取什么影响后取概率)

计算示例

  • 第一步:\( \frac{k}{n} \)(k个目标,n个总数)
  • 第二步:\( \frac{k-1}{n-1} \)(不放回)
  • 联合概率:\( \frac{k}{n} \times \frac{k-1}{n-1} \)

3. 放回实验的概率计算

概率不变

  • 每次实验概率相同
  • 总数和类别数量不变
  • 联合概率是各步概率的乘积

计算示例

  • 第一步:\( \frac{k}{n} \)
  • 第二步:\( \frac{k}{n} \)(放回)
  • 联合概率:\( \frac{k}{n} \times \frac{k}{n} = \left(\frac{k}{n}\right)^2 \)

4. 条件概率在树状图中的计算

受限路径

  • 识别所有导致条件事件发生的路径
  • 计算这些路径中目标事件发生的概率
  • 求出条件概率的比值

计算公式:\( P(B|A) = \frac{P(A \cap B)}{P(A)} \)